<?php
namespace Addons\OaSystem\Model;
//use Think\Model;
use Think\Model\ViewModel;

class OaUserRoleEmployeeViewModel extends ViewModel{
    public $viewFields = array(
        'OaUserRole'=>array('id','emp_id','role_id','assigned_by'),
        'OaRole'=>array(
            'name'=>'role_name',
            'dept_id'=>'role_deptid',
            '_on'=>'OaUserRole.role_id=OaRole.id'),
        'OaEmployee'=>array(
            'name'=>'emp_name',
            'dept_id',
            '_on'=>'OaUserRole.emp_id=OaEmployee.id'),
        'OaDept'=>array(
            'name'=>'dept_name',
            'pid',
            'dept_grade_id',
            '_on'=>'OaEmployee.dept_id=OaDept.id'),
        'OaDeptGrade'=>array(
            'value' => 'grade_value',
            'name'=>'grade_name',
            '_on'=>'OaDept.dept_grade_id=OaDeptGrade.id'),
    );
}
?>